#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>

#define lld long long
#define REP(i,n) for(int i=0;i<int(n);++i)
#define low first
#define high second
using namespace std;
typedef pair<int ,int> pii;

const int inf=1<<29;
int n,m;

int mice[100100],cheese[100100],dist[100100],cnt[100100];
pii pos[100100];
pii search(int x)
{
    int high,low;
    high = upper_bound(cheese,cheese+m,x)-cheese;
    if(high==m) return pii(m-1,m-1);
    else if(high==0) return pii(0,0);
    else low=high-1;
    return pii(low,high);
}
int main()
{
    int y0,y1;
    cin>>n>>m>>y0>>y1;
    fill(dist,dist+m,inf);
    REP(i,n) scanf("%d",mice+i);
    REP(i,m) scanf("%d",cheese+i);
    int ans=n;
    REP(i,n)
    {
        pos[i]=search(mice[i]);
        int low=pos[i].low,high=pos[i].high;
        int d1=abs(mice[i]-cheese[low]),d2=abs(mice[i]-cheese[high]);
        if(low==high)
        {
            if(d1<dist[low])
                dist[low]=d1,cnt[low]=1;
            else if(d1==dist[low]) cnt[low]++;
        }
        else
        {
            if(d1<d2)
            {
                if(d1<dist[low])
                    dist[low]=d1,cnt[low]=1;
                else if(d1==dist[low]) cnt[low]++;
            }
            else if(d2<d1)
            {
                if(d2<dist[high])
                    dist[high]=d2,cnt[high]=1;
                else if(d1==dist[high]) cnt[high]++;
            }
        }
    }
    REP(i,n)
    {
        int low=pos[i].low,high=pos[i].high;
        int d1=abs(mice[i]-cheese[low]),d2=abs(mice[i]-cheese[high]);
        if(low!=high&&d1==d2)
        {
            if(d1==dist[low]||dist[low]==inf){cnt[low]++;dist[low]=d1;continue;}
            if(d2==dist[high]) cnt[high]++;
            else if(d2<dist[high]) cnt[high]=1,dist[high]=d2;
        }
    }
    REP(i,m) ans-=cnt[i];
    cout<<ans<<endl;
    return 0;
}
